package com.oscroll.factory.practice.simple;


public class CarReflectFactory {

    public static Car getCar(Class clazz) {
        try {
            return (Car) clazz.newInstance();
        } catch (InstantiationException e) {
            e.printStackTrace();
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        }
        return null;
    }

}
